-- CALC_DIRECT_BUY_SCRAP_COST
-- 直接购买古遗迹碎片消耗

return function(needAmount)
    assert(type(needAmount) == "number" and needAmount > 0, "必须传入参数必须大于0");

    local goodsInfo = MarketM.getGoodsInfo(2006);
    local args = goodsInfo["bonus_args"];
    local price = goodsInfo["price"] or {};
    local gemCount = price["gem"] or 1;

    -- 购买后对应个数
    local scrapCount = FormulaM.invoke("CALC_GOODS_BONUS_DEBRIS", ME.user, args);

    local eachGemCount = math.modf(scrapCount / gemCount);

    local costGem = math.ceil(needAmount / eachGemCount);

    return {["cost_gem"] = costGem, ["buy_amount"] = eachGemCount * costGem};
end
